x11: Drop unused argument from query_state
authorMatthias Clasen <mclasen@redhat.com>
Wed, 26 Aug 2020 20:23:21 +0000 (16:23 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 26 Aug 2020 21:56:41 +0000 (17:56 -0400)
Now that this is backend-only api, we can just
drop unused arguments.

gdk/x11/gdkdevice-xi2-private.h
gdk/x11/gdkdevice-xi2.c
gdk/x11/gdkdrag-x11.c
gdk/x11/gdksurface-x11.c

index c9f6bef357c008f57f5d4399bdaf7566d4eb0f02..1ca4dc033d1a29d386aafe1552baf11d3484dbc1 100644 (file)
@@ -2,8 +2,7 @@
 #define __GDK_DEVICE_XI2_PRIVATE_H__
 
 void gdk_x11_device_xi2_query_state (GdkDevice        *device,
-                                     GdkSurface        *surface,
-                                     GdkSurface       **child_surface,
+                                     GdkSurface       *surface,
                                      double           *win_x,
                                      double           *win_y,
                                      GdkModifierType  *mask);
index 49f900178ddee10f118ff13182148367d315e49f..0102f65c7a8ce602c15f6a5c06c4153b79c0f0e4 100644 (file)
@@ -202,7 +202,6 @@ gdk_x11_device_xi2_set_surface_cursor (GdkDevice *device,
 void
 gdk_x11_device_xi2_query_state (GdkDevice        *device,
                                 GdkSurface        *surface,
-                                GdkSurface       **child_surface,
                                 double           *win_x,
                                 double           *win_y,
                                 GdkModifierType  *mask)
@@ -265,9 +264,6 @@ gdk_x11_device_xi2_query_state (GdkDevice        *device,
       XDestroyWindow (xdisplay, w);
     }
 
-  if (child_surface)
-    *child_surface = gdk_x11_surface_lookup_for_display (display, xchild_window);
-
   if (win_x)
     *win_x = xwin_x / scale;
 
index 9f6a5f5fdf5dbb890ed0649e0e1decc37d818f02..639d62f194950b0b70b76604f85d781aad6c9061 100644 (file)
@@ -2011,7 +2011,7 @@ _gdk_x11_surface_drag_begin (GdkSurface         *surface,
 
   precache_target_list (drag);
 
-  gdk_x11_device_xi2_query_state (device, surface, NULL, &px, &py, NULL);
+  gdk_x11_device_xi2_query_state (device, surface, &px, &py, NULL);
 
   gdk_x11_surface_get_root_coords (surface,
                                    round (px + dx),
@@ -2271,7 +2271,7 @@ gdk_dnd_handle_key_event (GdkDrag  *drag,
    * to query it here. We could use XGetModifierMapping, but
    * that would be overkill.
    */
-  gdk_x11_device_xi2_query_state (pointer, NULL, NULL, NULL, NULL, &state);
+  gdk_x11_device_xi2_query_state (pointer, NULL, NULL, NULL, &state);
 
   if (dx != 0 || dy != 0)
     {
index d7ed8d034a1a68a52cae6f32a71549adbce5c95b..3e9d83ad249c07139252ef8aeb819d6bb950698d 100644 (file)
@@ -2668,7 +2668,7 @@ gdk_x11_surface_get_device_state (GdkSurface     *surface,
   if (GDK_SURFACE_DESTROYED (surface))
     return FALSE;
 
-  gdk_x11_device_xi2_query_state (device, surface, NULL, x, y, mask);
+  gdk_x11_device_xi2_query_state (device, surface, x, y, mask);
 
   return *x >= 0 && *y >= 0 && *x < surface->width && *y < surface->height;
 }